1. Field of the Invention
The invention relates to processing SCSI operations, and more particularly to actively changing processor instructions to remove long conditional branching sequences.
2. Description of the Related Art
Computer systems are becoming more powerful and flexible with each passing moment. These changes are due to numerous factors, including improvements in semiconductor devices such as microprocessors and memory chips, in computer system architectures and in software capabilities.
One way flexibility is increasing, as well as performance in many instances, is by the use of Small Computer System Interface (SCSI) compatible storage devices. SCSI is a standard specification developed by the American National Standard for Information System (ANSI) and has gone through several generations. The current issued specification is SCSI-2, with SCSI-3 under development. The specification, either final or most recent published draft, for SCSI-2, which is hereby incorporated by reference, defines mechanical, electrical and functional requirements for various peripheral devices. The peripheral devices include hard disk drives, CD-ROM drives, tape units, optical drives and others as commonly used with small computers.
One advantage of SCSI is that numerous devices can be connected to a single bus and be accessed through a single controller, with only software device drivers varying between the devices. This allows easy connection of new devices. Combined with the variety of devices, SCSI thus is a very flexible system.
A second advantage of SCSI is that it is a high performance standard. Thus, as it becomes more widely supported, computer system performance will increase. Because of the high performance capabilities, specialized controller integrated circuits have been developed. These chips handle many of the low level complexities of interfacing to the SCSI bus, which is the connection between the controller and the various devices. This reduction to an integrated circuit level improves performance and simplifies the software device drivers which execute on the host computer system. Recent controller chips have become quite advanced. One example is the 53C710 SCSI I/O Processor from NCR Corporation (NCR) of Dayton, Ohio. This device includes a DMA interface to allow movement of data between the SCSI devices and host computer memory without host processor intervention. This provides a large performance increase. The 53C710 further includes a processor specifically designed to perform SCSI operation. This is referred to as a SCRIPTS processor. By incorporation of this processor in the controller, even more functionality can be transferred from the host device drive to the controller, allowing an even greater performance increase of the computer system. Familiarity with the NCR 53C710 SCSI I/O controller or a Similar device and operations on the SCSI bus are assumed in this specification.
One requirement of a processor, such as the SCRIPTS processor in the 53C710, is software or controlling instructions. In using the 53C710, these instructions can be located in dual-port RAM interfaced directly to the 53C710. However, while this option offers high performance, it also increases cost and board space. Alternatively, the 53C710 includes bus master logic capable of accessing host computer main memory directly. The 53C710 can thus also access host computer main memory to obtain its instructions. While there are some delays in obtaining the host bus, this option reduces cost and board space without a severe memory access penalty and so is often used.
When the 53C710 is to be designed into a system or a controller card, certain SCRIPTS language sequences are provided by NCR to allow the controller board or computer system designer to incorporate the device with greatly reduced effort. While the sequences perform the required functions, in some areas performance has been sacrificed. While the SCRIPTS processor is quite capable and well designed for performing SCSI operations, its performance is somewhat reduced in performing certain simple logical operations, such as conditional branching. This creates a problem in some instances.
One problem area relates to providing messages and commands from the computer to the SCSI device. The SCSI specification is very flexible, so that a very large number of options are available for messages and commands. However, some of these messages and commands are special and require very different handling from normal data transfer messages and commands. To resolve this problem, the conventional SCRIPTS sequences for the 53C710 check for these special cases before executing the conventional cases. This checking is done for each operation or thread and is done using a string of conditional branching operations. Thus performance is reduced on every operation.
A second area relates to the use of tagged queuing with the SCSI devices. Tagged queuing allows multiple commands from a single source or initiator to be present in a single device or target. The initiator includes a tag value along with each command. The target disconnects from communication with the controller, performs the operation and reselects the controller to complete the communication, providing the tag value with the return message. The multiple queues and disconnection allows improved efficiency of the SCSI bus. However, a complicating factor is that when the target device indicates completion and reselects the initiator, conventionally the controller, the initiator must stop its current task and determine the proper task or thread to complete. In the case of the conventional SCRIPTS sequences for the 53C710, this meant traversing another conditional branching string, each branch checking to determine if that particular queue or thread was being completed. Again, this process was slow and so performance suffered.
Therefore it would be desirable to resolve these two areas of conditional branching strings to even further improve SCSI operations when using the 53C710 and similar devices.